package DateAndTime;

import java.util.Calendar;

public class Example22 {
    public static void main(String[] args) {
        //获取表示当前时间
        Calendar calendar = Calendar.getInstance();
        //指定日期对象，将MONTH设为13
        calendar.set(Calendar.MONTH,13);
        System.out.println(calendar.getTime());
        //开启non-lenient
        calendar.setLenient(false);
        calendar.set(Calendar.MONTH,13);
        System.out.println(calendar.getTime());
    }
}
